package com.bifang.core.dao.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * @author chenzh
 * @since 2020-09-26
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("QRTZ_CRON_TRIGGERS")
@ApiModel(value = "QrtzCronTriggers对象", description = "")
public class QrtzCronTriggers extends Model<QrtzCronTriggers> {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "调度名称")
    @TableId(value = "SCHED_NAME", type = IdType.INPUT)
    private String schedName;

    @ApiModelProperty(value = "qrtz_triggers表trigger_name的外键")
    @TableField("TRIGGER_NAME")
    private String triggerName;

    @ApiModelProperty(value = "qrtz_triggers表trigger_group的外键")
    @TableField("TRIGGER_GROUP")
    private String triggerGroup;

    @ApiModelProperty(value = "cron表达式")
    @TableField("CRON_EXPRESSION")
    private String cronExpression;

    @ApiModelProperty(value = "时区")
    @TableField("TIME_ZONE_ID")
    private String timeZoneId;

    @Override
    public Serializable pkVal() {
        return this.schedName;
    }
}
